package cn.tedu.tourism.order.controller;

import cn.tedu.tourism.base.response.JsonResult;
import cn.tedu.tourism.order.pojo.dto.RoomOrdersParam;
import cn.tedu.tourism.order.service.OrderService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/v1/order/")
@Api(tags = "订单管理")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @PostMapping("roomOrder/insert")
    public JsonResult roomOrder(RoomOrdersParam roomOrdersParam){
        log.debug("添加订单信息：{}",roomOrdersParam);
        orderService.roomOrder(roomOrdersParam);
        return JsonResult.ok();
    }
}
